<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form name ="frm_tim" method = "post" action="">
<div>
	<h1> TÌM KIẾM MẶT HÀNG </h1>
	<p> Nhập từ khóa: <input name = "tim" type = "text" value= ""/> 
	<input name = "bt_ok" type = "submit" value = "Tìm"/> </p> 
</div>
</form>
<?php if(isset($data)){?>
<table width="795" border="0" align="center" cellpadding="2" cellspacing="2"  bgcolor = "#D4D0C8">
  <tr>
    <th colspan="4" valign="top"><div align="center">KẾT QUẢ TÌM KIẾM</div></th>
  </tr>
   <tr>
    <td colspan="4" valign="top"><div align="center"></div></td>
  </tr>
  <tr class = "list">
    <td valign="top"><div align="center">Tên Mặt Hàng</div></td>
    <td valign="top"><div align="center">Số Lượng</div></td>
    <td valign="top"><div align="center">Đơn Giá </div></td>
    <td valign="top"><div align="center">Mô Tả</div></td>
  </tr>
  <?php foreach ($data['list'] as $value){?>
  <tr>
  
    <td valign="top"><div align="center"><?php echo $value['TenMH'];?></div></td>
    <td valign="top"><div align="center"><?php echo $value['SoLuong'];?></div></td>
    <td valign="top"><div align="center"><?php echo $value['Gia'];?></div></td>
    <td valign="top"><div align="center"><?php echo $value['MoTa'];?></div></td>
    
    	
  </tr>
    <?php 
    		}
    	?>

</table>
<?php } ?>
</body>
</html>
